import cv2
import numpy as np
img=cv2.imread("a.jpg")
cv2.imshow('Input',img)
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
sift=cv2.SIFT_create()
kp=sift.detect(gray)
img=cv2.drawKeypoints(gray,kp,img)
cv2.imshow('drawKeypoints',img)
cv2.imshow('drawKeypoints',img)
kp,des=sift.compute(gray,kp)
print("kp.shape:",np.shape(kp))
print("des.shape:",np.shape(des))
cv2.waitKey()
cv2.destroyWindow()